<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位的叠放顺序z-index</title>
    <style>
        .box{
            position: absolute;
            top: 0px;
            left: 0px;
            width: 300px;
            height: 300px;
        }
        .one{
            z-index: 1;
            background-color: blue;
        }
        .two{
            z-index: 2;
            background-color: pink;
            top: 50px;
            left: 50px;
        }
        .three{
            background-color: skyblue;
            top: 100px;
            left: 100px;
        }
    </style>
</head>
<body>
    <div class="box one"></div>
    <div class="box two"></div>
    <div class="box three"></div>
</body>
</html>